<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .big{
            width: 800px;
            height: 800px;
            margin: 20px auto;
            background-color: rgb(228, 225, 66);
            overflow: hidden;
        }
        .w{
            width: 400px;
            margin-top: 100px;
            background-color: rgb(231, 16, 16);
            transition: all 1s 2s steps(4);
        }
        .big:hover .w{
            height: 400px;
        }
    </style>
</head>
<body>
    <div class="big">
        <div class="w">
        </div>
    </div>
</body>
</html>